import { redirect } from '../helpers/loginAuth';
import { rootAlias } from '../../config';
console.log(rootAlias)
/**
 * root router
 */
export default {
  path: rootAlias || '/',
  component: require('../views').default,
  indexRoute: {
    component: require('../views/login').default,
    onEnter: redirect(`${rootAlias}/login`)
  },
  childRoutes: [
    require('./login'),
    require('./list'),
    require('./news'),
    require('./forum'),
    require('./norights'),
    require('./404')
  ]
}
